<?php
require_once($application_folder."/controllers/navigator.php");
class imageMap extends navigator 
{

    function __construct()
    {
        parent::__construct(); 
    } 

    function index(){

        $this->myImage(); 

    }

    function myImage(){

        $path = './';
        //Set images folder. (optional parameter)
        define("FOLDER_IMAGES",$path.'admin/tempatt/');

        //Set cache folder. (must parameter)
        define("FOLDER_CACHE",$path."application/cache/");    

        //Set jpeg quality 
        define("JPEG_QUALITY","90");

        //set image not found filepath. a must parameter. Output this image in case the image not found.
        define("FILEPATH_IMAGE_NOT_FOUND",$path."assets/images/blank.jpg");


        //--------------------------------------------------------------------

        $this->load->library('imageMap');

        //set defines data
        $this->getImage = new GetImage();
        $this->getImage->setImagesFolder(FOLDER_IMAGES);
        $this->getImage->setCacheFolder(FOLDER_CACHE);
        $this->getImage->setErrorImagePath(FILEPATH_IMAGE_NOT_FOUND);
        $this->getImage->setJpegQuality(JPEG_QUALITY);

        $this->getImage->showImage('p16ki0jjhu189j155kl6r998it31.jpg',425,155,"exacttop");
        echo $this->getImage->getFilename();

    }



}